$(function()
{
   $("#button1").click(function()
   {
	  document.getElementById('bo').style.overflow = "hidden";
      var str='从1#201&nbsp;&nbsp;&nbsp;转移至<select id="strselect"><option value="1#202">1#202</option><option value="1#203">1#203</option><option value="1#204">1#204</option></select><br><div style="margin-left:30px;margin-top:5px;"><input type="button" value="确定" onclick="f()"><input type="button" value="取消" onclick="btnClose()"></div>';
      $(".form").html(str);
      $("#BgDiv").css({ display:"block",height:$(document).height()});
      var yscroll=document.documentElement.scrollTop;
      $("#DialogDiv").css("display","block");
      document.documentElement.scrollTop=0;
   });
});
function btnClose(){
	$("#BgDiv").css("display","none");
	$("#DialogDiv").css("display","none");
}

function s(ss){
	if(ss==1) {
		$('#div1').css('display','none');
		$('#div2').css('display','block');
	}else if(ss==2){
		$('#div2').css('display','none');
		$('#div1').css('display','block');
	}
}
function f(){
	document.getElementById("button4").disabled=false;
	document.getElementById("button1").disabled=true;
	document.getElementById("button3").disabled=true;
	document.getElementById("btnShow").disabled=true;
	document.getElementById("shu").innerHTML=document.getElementById("strselect").value;
	btnClose();
}
function showbutton2(){
	if(confirm("您是否肯定回收？")){
		document.getElementById("button4").disabled=true;
		document.getElementById("button1").disabled=false;
		document.getElementById("button3").disabled=false;
		document.getElementById("btnShow").disabled=false;
		document.getElementById("shu").innerHTML="未分配";
	}
}
function upda(){
	if($('#d1').text()=='珠海校区')
		str='<select id="in1"><option selected="selected" value="珠海校区">珠海校区</option><option value="广州校区">广州校区</option></select>';
	else
		str='<select id="in1"><option value="珠海校区">珠海校区</option><option selected="selected" value="广州校区">广州校区</option></select>';
	if($('#d3').text()=='男')
		str2='<select id="in3"><option selected="selected" value="男">男</option><option value="女">女</option></select>';
	else
		str2='<select id="in3"><option value="男">男</option><option selected="selected" value="女">女</option></select>';
	$('#d1').html(str);
	$('#d2').html('<input type="text" size="10" value="'+$('#d2').text()+'" id="in2" />');
	$('#d3').html(str2);
	$('#btnShow').css('display','none');
	$('#upda1').css('display','block');
	$('#upda2').css('display','block');
	document.getElementById("button1").disabled=true;
	document.getElementById("button3").disabled=true;
	document.getElementById("btnShow").disabled=true;
}
function upda1(){
	$('#d1').html(document.getElementById("in1").value);
	$('#d2').html(document.getElementById("in2").value);
	$('#d3').html(document.getElementById("in3").value);
	$('#btnShow').css('display','block');
	$('#upda1').css('display','none');
	$('#upda2').css('display','none');
	document.getElementById("button1").disabled=false;
	document.getElementById("button3").disabled=false;
	document.getElementById("btnShow").disabled=false;
}
function upda2(){
	if(confirm("确定修改？")){
		$('#d1').html(document.getElementById("in1").value);
		$('#d2').html(document.getElementById("in2").value);
		$('#d3').html(document.getElementById("in3").value);
		$('#btnShow').css('display','block');
		$('#upda1').css('display','none');
		$('#upda2').css('display','none');
		document.getElementById("button1").disabled=false;
		document.getElementById("button3").disabled=false;
		document.getElementById("btnShow").disabled=false;
	}
}
function deltr(i){
	if(confirm("确定删除")){
		$('#tr'+i).css('display','none');
	}
}


function jsAddItemToSelect(objSelect) {        
    //判断是否存在        
	var arr1=new Array(['软件专业'],['多媒体'],['网络专业'],['信管专业']);
	var op2=document.getElementById("op2");
	if(objSelect.value=='0'){
		op2.options.length = 0; 
		var varItem = new Option('全部','全部');
    	op2.options.add(varItem);
		for(var i =0;i<arr1.length;i++){
			var varItem = new Option(arr1[i], arr1[i]);
    	    op2.options.add(varItem);
		}
	}
}   
function jsAddItemToSelect1(objSelect) {        
    //判断是否存在        
	var arr1=new Array(['1'],['2'],['3'],['4']);
	var op3=document.getElementById("op3");
	if(objSelect.value=='软件专业'){
		op3.options.length = 0;  
		var varItem = new Option('全部','全部');
    	op3.options.add(varItem);
		for(var i =0;i<arr1.length;i++){
			var varItem = new Option(arr1[i], arr1[i]);
    	    op3.options.add(varItem);
		}
	}
} 

